$def with (privData)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
$:privData['render'].header(privData)
<script language="javascript" src="http://webapi.amap.com/maps?v=1.2&key=f1c10ccd66938f3facb624a3f388c022"></script> 
<body>
$:privData['render'].pageheader(privData)

<h2>新增产品</h2>
<form action="$makeUrl('/admin/product/save')" method="post">
    <table width="750" border="0" cellspacing="0" cellpadding="1" class="addtable">
        <tr>
            <td width="100" scope="col">产品类别:</td>
            <td width="608" scope="col">
                <SELECT  name="category" id="category">
                    $for k, v in privData['CATEGORY_LIST'].items():
                    <option value="$:k"
                    $if k == 1:
                        selected="selected"
                    >$:v</option>
                </SELECT>
            </td>
        </tr>
        <tr>
            <td width="100" scope="col">图片:</td>
            <td width="608" scope="col">
                $:privData['render'].thumbnail_select_widget(privData)
            </td>
        </tr>
        <tr>
            <td width="100" scope="col">名称:</td>
            <td width="608" scope="col"><input name="name" type="text" /></td>
        </tr>
        <tr>
            <td width="100" scope="col">价格:</td>
            <td width="608" scope="col"><input name="price" type="text" /></td>
        </tr>
        <tr>
            <td width="100" scope="col">折扣:</td>
            <td width="608" scope="col"><input name="discount" type="text" /></td>
        </tr>
        <tr>
            <td width="100" scope="col">推荐指数:</td>
            <td width="608" scope="col"><input name="rank" type="text" /></td>
        </tr>
        <tr>
            <td width="100" scope="col">所属用户:</td>
            <td width="608" scope="col">
                <SELECT  name="owner" id="owner">
                    $for k, v in privData['USER_LIST'].items():
                    <option value="$:k"
                    $if k == 1:
                        selected="selected"
                    >$:v</option>
                </SELECT>
            </td>
        </tr>

        <tr>
            <td width="100" scope="col">公司:</td>
            <td width="608" scope="col">
                <SELECT  name="company" id="company">
                    $for k, v in privData['COMPANY_LIST'].items():
                    <option value="$:k"
                    $if k == 1:
                        selected="selected"
                    >$:v</option>
                </SELECT>
            </td>
        </tr>

        <tr>
            <td width="100" scope="col">联系人:</td>
            <td width="608" scope="col"><input name="contact" type="text" /></td>
            </td>
        </tr>

        <tr>
            <td width="100" scope="col">电话:</td>
            <td width="608" scope="col"><input name="telephone" type="text" /></td>
            </td>
        </tr>

        <tr>
            <td width="100" scope="col">邮件地址:</td>
            <td width="608" scope="col"><input name="email" type="text" /></td>
            </td>
        </tr>

        <tr>
            <td width="100" scope="col">地区:</td>
            <td width="608" scope="col"><input name="region" type="text" /></td>
            </td>
        </tr>

        <tr>
            <td colspan="2" scope="col">
            $:privData['render'].map_select_widget(privData)
            </td>
        </tr>

        <tr>
            <td width="100" scope="col">描述:</td>
            <td colspan="2" scope="col">
                $:privData['render'].album_insert_widget(privData)
                <textarea rows="10" cols="5" name="desc" id="desc"></textarea>
                    <script type="text/javascript" src="$makeUrl('/static/editor/tinyeditor.js')"></script>
                    <link rel="stylesheet" href="$makeUrl('/static/editor/style.css')" />
                    <script type="text/javascript">
                        var instance=new TINY.editor.edit('editor',{
                            id:'desc',
                            width:654,
                            height:175,
                            cssclass:'contentls',
                            controlclass:'tecontrol',
                            rowclass:'teheader',
                            dividerclass:'tedivider',
                            controls:['bold','italic','underline','strikethrough','|','subscript','superscript','|', 'orderedlist','unorderedlist','|','outdent','indent','|','leftalign',
                                'centeralign','rightalign','blockjustify','|','unformat','|','undo','redo','print','n',
                                'font','size','style','forecolor','backcolor','|','image','swf','media','upload','|','hr','link','unlink','|','cut','copy','paste'],
                            footer:true,
                            fonts:['楷体','宋体','黑体','Verdana','Arial','Georgia'],
                            xhtml:true,
                            uploadexc:"$makeUrl('/admin/upload')",
                            bodyid:'editor',
                            footerclass:'tefooter',
                            toggle:{text:'源码',activetext:'视图',cssclass:'toggle'},
                            resize:{cssclass:'resize'}
                            });
                            var _j = jQuery.noConflict();
                            _j("#insert_img_album").change(function(){
                                var sel_category = _j(this).val();
                                _j("#insert_thumbnail_list").children("div").addClass("hidden").filter("#insert_thumbnail_list_"+sel_category).removeClass("hidden");
                            });
                            _j("#toggle_select_thumbnail").click(function(){
                                _j("#insert_thumbnail_list").toggle();
                            });
                            _j("#insert_select_thumbnail").click(function(){
                                window._tmp_edit_obj.execCommand("insertimage", 0, _j(":radio[name='insert_thumbnail_raido']:checked").val());
                                _j("#insert_thumbnail_list").hide();
                            });
                    </script>
            </td>
        </tr>

        <tr><td colspan="2" scope="col">
            <input type="submit" name="submit" value="保存" id="submits" onmouseover="instance.post();" />
        </td></tr>
    </table>     
</form>
</body></html>

